<template>
  <RoomInfo
    showType="modal"
    menuMode="vertical"
    :pageFrom="pageFrom"
    :villageId="villageId"
    :roomId="roomId"
    appSuffix="allComponents"
    :maxRoomNumber="maxRoomNumber"
    :showSubRoomSelect="true"
    @close="onClose"
  />
</template>

<script>
import store from '@/store'
import {computed, reactive, watch, toRefs, onMounted, ref} from 'vue'
import { useRoute } from "vue-router";
import RoomInfo from "@/components/village/RoomInfo.vue";


/*  mainapp 打开弹框专用  */
export default {
  components: { RoomInfo },
  setup() {
    const $route = useRoute();
    const roomId = ref($route.query.roomId);
    const pageFrom = ref($route.query.pageFrom);
    const villageId = ref($route.query.villageId);
    const maxRoomNumber = ref($route.query.maxRoomNumber);

    const onClose = () => {
      window?.microApp?.getData()?.closeDrawer();
    };

    return {
      roomId,
      pageFrom,
      villageId,
      maxRoomNumber,
      onClose,
    }
  }
}
</script>

<style lang="scss" scoped>

</style>